#ifndef yield_curve
#define yield_curve

#include <cstdio>
#include <cmath>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>

using namespace std;

typedef vector<double> DOUBLEVECTOR;

typedef enum { USD = 0, EUR = 1, JPY = 3, GBP = 4, CAD = 5, CHF = 6, AUD = 7,
                CNY = 8, KRW = 9, NOK = 10, SKK = 11, SGD = 12, SEK = 13} currencyType;

class YieldCurve 
{
	DOUBLEVECTOR SwapArray;
	DOUBLEVECTOR SpotArray;

public:

	YieldCurve();

//	virtual ~yield_curve();

	int ReadSwapFile(string swapfile);
	int ReadSwapFile(currencyType currency, string swapfile);
	int GenerateSpotArray();

	double SpotRate(double time);
	double DiscountFactor(double time);
	double ForwardRate(double time, double period);
 

};

#endif
